let report_id;

apiready = function(){
        //初始化窗体
        settime();
        iniFrom();
        addData();

}
function iniFrom(){
  report_id=api.pageParam.report_id;
}

function addData(){
  console.log('http://'+sourceIp+':20099/tongdun/getReportInfo?report_id='+report_id)
  // 提交JSON数据
  api.ajax({
    url: 'http://'+sourceIp+':20099/tongdun/getReportInfo?report_id='+report_id,
    method: 'get',
    headers: {'Content-Type': 'application/json;charset=utf-8'}
  },function(ret, err) {
      if (ret) {
        var header=ret.data.header;
        var inner=ret.data.inner;
        inner=inner.replace(/\/htdocs\/images\/credit\//g,'../report/');
        // var detailSectionWrap=ret.data.detailSectionWrap;
        $api.html($api.byId('header'),header);
        $api.html($api.byId('inner'),inner);
        initContainer();
        if(!$api.hasCls($api.byId('coverPage'), 'hide'))
          $api.addCls($api.byId('coverPage'), 'hide');
      }
      else {
          console.log(JSON.stringify(err));
      }
    });
}
